﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using AdminApplication.PresentationLogic.Controllers;

namespace AdminApplication.Controls
{
    public partial class PanelUserActions : UserControl
    {
        PanelUserActionsController controller;
        public PanelUserActions()
        {
            InitializeComponent();
            controller = new PanelUserActionsController(this);
        }

        private void Valida_Click(object sender, RoutedEventArgs e)
        {
            controller.validaUtente(true);
        }
        private void Visualizza_Click(object sender, RoutedEventArgs e)
        {
            controller.validaUtente(false);
        }

        public void esportaButton_Click(object sender, RoutedEventArgs e)
        {
            if(TipoExport.SelectedItem==ProfiliCSV)
                controller.exportCSVProfili();
            if (TipoExport.SelectedItem == ProfiliExcel)
                controller.exportExcelProfili();
        }

        private void Delete_Click(object sender, RoutedEventArgs e)
        {

            controller.deleteUtenti();
        }
    }
}
